#pragma once
#ifndef __VIRTUALSERVER_H__
#define __VIRTUALSERVER_H__

#include <app/App.h>
#include <memory>
#include <msg/message.h>
#include "net/tcp_server.hpp"


class VirtualServer: public tcp_server, public App, public std::enable_shared_from_this<VirtualServer>{
    uint32_t rule_id;
public:
    VirtualServer(uint16_t port, uint32_t rule_id);

    uint32_t get_rule_id();

    virtual void fd_hander() override;

    // 不会收到message  什么也不做
    virtual void message_hander(message msg) override;
};

#endif  // __VIRTUALSERVER_H__